Searched hist:"1 d495f1c896cfa8c78e7a858119e2fbfcbd0925e" (Results 1 – 1 of 1) sorted by relevance
/linux/include/uapi/linux/ |
H A D | xfrm.h | diff 1d495f1c896cfa8c78e7a858119e2fbfcbd0925e Wed Oct 04 01:18:28 CEST 2023 Kees Cook <keescook@chromium.org> xfrm: Annotate struct xfrm_sec_ctx with __counted_by
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions).
As found with Coccinelle[1], add __counted_by for struct xfrm_sec_ctx.
Cc: Steffen Klassert <steffen.klassert@secunet.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: "David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org Link: https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci [1] Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
|